package com.lq.ecoldchain.internet

import com.lq.ecoldchain.entity.wechat.WxTokenBean
import com.lq.ecoldchain.entity.wechat.WxUserBean
import io.reactivex.Observable
import retrofit2.http.GET
import retrofit2.http.Query

/*
*2019/1/18 0018  14:07
*function by lq
*/
interface WChatAPIService{
    @GET("oauth2/access_token")
    fun accessToken(@Query("appid")appid:String,@Query("secret")secret:String,@Query("code")code:String,@Query("grant_type")grant_type:String,@Query("connect_redirect")redirect:String):Observable<WxTokenBean>

    @GET("userinfo")
    fun userInfo(@Query("access_token")token:String,@Query("openid")id:String,@Query("connect_redirect")redirect:String):Observable<WxUserBean>
}